package org.millioncall.yueyoga.admin.model.base;

import java.util.Date;

import org.millioncall.openplatform.util.DateTimeUtils;
import org.millioncall.yueyoga.admin.model.OrderDetail;

@SuppressWarnings("serial")
public class BaseProduct implements java.io.Serializable {
	private Integer productId;
	private String name;
	private Integer type;
	private Integer counts;
	private Integer limitOfWeek;// 每周限制几次使用
	private Date beginTime;
	private Date endTime;
	private Double price;
	private String remarks;
	private Integer enable;
	private String name1;// 类型名称
	private String expiringThd; // 会员产品到期临界值
	private Double beMemberThd; // 成为正式会员的临界值
	private String strBeginTime;
	private String strEndTime;
	private String organizationId;
	private OrderDetail orderDetail;

	public BaseProduct() {

	}

	public BaseProduct(Integer productId, String name, Integer type,
			Integer counts, Date beginTime, Date endTime, Double price,
			String remarks, Integer enable, String organizationId) {
		this.productId = productId;
		this.name = name;
		this.type = type;
		this.counts = counts;
		this.beginTime = beginTime;
		this.endTime = endTime;
		this.price = price;
		this.remarks = remarks;
		this.enable = enable;
		this.organizationId = organizationId;
	}

	public String getName1() {
		return name1 == null ? "" : name1;
	}

	public void setName1(String name1) {
		this.name1 = name1;
	}

	public String getOrganizationId() {
		return organizationId == null ? "" : organizationId;
	}

	public void setOrganizationId(String organizationId) {
		this.organizationId = organizationId;
	}

	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	public String getName() {
		return name == null ? "" : name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getCounts() {
		return counts;
	}

	public void setCounts(Integer counts) {
		this.counts = counts;
	}

	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getRemarks() {
		return remarks == null ? "" : remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Integer getEnable() {
		return enable;
	}

	public void setEnable(Integer enable) {
		this.enable = enable;
	}

	public String getExpiringThd() {
		return expiringThd == null ? "" : expiringThd;
	}

	public void setExpiringThd(String expiringThd) {
		this.expiringThd = expiringThd;
	}

	public Double getBeMemberThd() {
		return beMemberThd;
	}

	public void setBeMemberThd(Double beMemberThd) {
		this.beMemberThd = beMemberThd;
	}

	public OrderDetail getOrderDetail() {
		return orderDetail;
	}

	public void setOrderDetail(OrderDetail orderDetail) {
		this.orderDetail = orderDetail;
	}

	public String getStrBeginTime() {
		this.strBeginTime = "";
		if (getBeginTime() != null) {
			this.strBeginTime = DateTimeUtils.getInstance().format(
					getBeginTime(), "yyyy-MM-dd");
		}
		return this.strBeginTime;
	}

	public String getStrEndTime() {
		this.strEndTime = "";
		if (getEndTime() != null) {
			this.strEndTime = DateTimeUtils.getInstance().format(getEndTime(),
					"yyyy-MM-dd");
		}
		return this.strEndTime;
	}

	public Integer getLimitOfWeek() {
		return limitOfWeek;
	}

	public void setLimitOfWeek(Integer limitOfWeek) {
		this.limitOfWeek = limitOfWeek;
	}
}
